import { defineStore } from 'pinia'
export const useThemeColor = defineStore('themeColor', {
    state: () => {
        return {
            theme: "white",
        }
    },
    getters: {
        themeFontColor: (state): string => {
            const a: Record<string, string> = {
                blackFont: "#b82525",
                whiteFont: "#2d8cf0",
                deeppinkFont: "deeppink",
            }
            return a[`${state.theme}Font`]
        },
        // 双层颜色 请看 ranklist
        themeBgColor: (state) => {
            const a: Record<string, string> = {
                blackPbg: "#1a1c20",
                whitePbg: "#f9f9f9",
                blackHoverSing: "#2c2e32",
                whiteHoverSing: "#ebeced",
                blackHoverP: "#fff",
                whiteHoverP: "#575757",
            };
            const themePbg = a[`${state.theme}Pbg`];
            const themeHoverSing = a[`${state.theme}HoverSing`];
            const themeHoverP = a[`${state.theme}HoverP`];
            return { themePbg, themeHoverSing, themeHoverP };
        }
    },

    actions: {}
})